<!-- 
临床康复介入医疗记录单
-->

<template>
  <el-form :model="formData" ref="vForm" :rules="rules" label-position="left" label-width="80px" size="medium" @submit.native.prevent>
    <div class="static-content-item-head center">
      <div class="static-content-item">
        <div>姓名：</div>
        <div>{{user.patientName}}</div>
      </div>
      <div class="static-content-item">
        <div>性别：</div>
        <div>{{getGender}}</div>
      </div>
      <div class="static-content-item">
        <div>科室：</div>
        <div>{{user.department}}</div>
      </div>
      <div class="static-content-item">
        <div>床号：</div>
        <div>{{user.bedNum}}</div>
      </div>
      <div class="static-content-item">
        <div>病案号：</div>
        <div>{{user.admissionNum}}</div>
      </div>
    </div>
    <div class="center">
      <el-divider direction="horizontal"></el-divider>
    </div>
    <div>
      <div class="record-title">临床康复介入医疗记录单</div>
    </div>
    <div class="table-container center">
      <table class="table-layout">
        <tbody>
          <tr>
            <td class="table-cell">主要诊断
            </td>
            <td class="table-cell" colspan="8">
              <input type="text" :disabled="records.start" v-model="mainDiagnosis" placeholder="主要诊断">
            </td>
          </tr>
          <tr>
            <td class="table-cell" rowspan="11">康复评定（勾选）
            </td>
            <td class="table-cell" colspan="2" rowspan="2">评定项目
            </td>
            <td class="table-cell" colspan="3">初评
            </td>
            <td class="table-cell" colspan="3">复评
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2">结果
            </td>
            <td class="table-cell">时间
            </td>
            <td class="table-cell" colspan="2">结果
            </td>
            <td class="table-cell">时间
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2" rowspan="3">
              <input type="checkbox" :disabled="records.start" v-model="rehabilitationEvaluation.isBrunnstrom" name="checkedCheckbox">
              <label for="checkedCheckbox">Brunnstrom偏瘫运动功能评定</label>
            </td>
            <td class="table-cell">上肢
            </td>
            <td class="table-cell">
              <input :disabled="records.start" v-model="preliminaryEvaluation.brunnstromUpperLimbResult" type="text" placeholder="上肢">
            </td>
            <td class="table-cell" rowspan="3">
              <el-date-picker :disabled="records.start" v-model="preliminaryEvaluation.brunnstromTime" type="datetime" placeholder="初评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input v-model="preliminaryEvaluation.brunnstromTime" type="text" placeholder="初评时间"> -->
            </td>
            <td class="table-cell">上肢
            </td>
            <td class="table-cell">
              <input :disabled="records.end" v-model="preliminaryEvaluationReevaluation.brunnstromUpperLimbResult" type="text" placeholder="上肢">
              <!-- <input type="text" placeholder="上肢"> -->
            </td>
            <td class="table-cell" rowspan="3">
              <el-date-picker :disabled="records.end" v-model="preliminaryEvaluationReevaluation.brunnstromTime" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <el-date-picker type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" /> -->
              <!-- <input type="text" placeholder="复评时间"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell">下肢
            </td>
            <td class="table-cell">
              <input :disabled="records.start" v-model="preliminaryEvaluation.brunnstromLowerLimbResult" type="text" placeholder="下肢">
            </td>
            <td class="table-cell">下肢
            </td>
            <td class="table-cell">
              <input :disabled="records.end" v-model="preliminaryEvaluationReevaluation.brunnstromLowerLimbResult" type="text" placeholder="下肢">
              <!-- <input type="text" placeholder="下肢"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell">手
            </td>
            <td class="table-cell">
              <input :disabled="records.start" v-model="preliminaryEvaluation.brunnstromHandResult" type="text" placeholder="手">
            </td>
            <td class="table-cell">手
            </td>
            <td class="table-cell">
              <input :disabled="records.end" v-model="preliminaryEvaluationReevaluation.brunnstromHandResult" type="text" placeholder="手">
              <!-- <input type="text" placeholder="手"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationEvaluation.isAsia" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">ASIA残损分级</label>
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.start" v-model="preliminaryEvaluation.asiaResult" type="text" placeholder="ASIA初评">
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.start" v-model="preliminaryEvaluation.asiaTime" type="datetime" placeholder="初评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input v-model="preliminaryEvaluation.asiaTime" type="text" placeholder="初评时间"> -->
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.end" v-model="preliminaryEvaluationReevaluation.asiaResult" type="text" placeholder="ASIA复评">
              <!-- <input type="text" placeholder="ASIA复评"> -->
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.end" v-model="preliminaryEvaluationReevaluation.asiaTime" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input type="text" placeholder="复评时间"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationEvaluation.isMbiAdl" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">MBI-ADL能力</label>
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.start" v-model="preliminaryEvaluation.mbiAdlResult" type="text" placeholder="MBI-ADL初评">
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.start" v-model="preliminaryEvaluation.mbiAdlTime" type="datetime" placeholder="初评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input type="text" placeholder="初评时间"> -->
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.end" v-model="preliminaryEvaluationReevaluation.mbiAdlResult" type="text" placeholder="MBI-ADL复评">
              <!-- <input type="text" placeholder="MBI-ADL复评"> -->
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.end" v-model="preliminaryEvaluationReevaluation.mbiAdlTime" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <el-date-picker type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" /> -->
              <!-- <input type="text" placeholder="复评时间"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationEvaluation.isMmse" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">MMSE评定</label>
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.start" v-model="preliminaryEvaluation.mmseResult" type="text" placeholder="MMSE初评">
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.start" v-model="preliminaryEvaluation.mmseTime" type="datetime" placeholder="初评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input type="text" placeholder="初评时间"> -->
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.end" v-model="preliminaryEvaluationReevaluation.mmseResult" type="text" placeholder="MMSE复评">
              <!-- <input type="text" placeholder="MMSE复评"> -->
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.end" v-model="preliminaryEvaluationReevaluation.mmseTime" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input type="text" placeholder="复评时间"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationEvaluation.isGcs" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">GCS昏迷评定</label>
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.start" v-model="preliminaryEvaluation.gcsResult" type="text" placeholder="GCS初评">
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.start" v-model="preliminaryEvaluation.gcsTime" type="datetime" placeholder="初评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input v-model="preliminaryEvaluation.gcsTime" type="text" placeholder="初评时间"> -->
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.end" v-model="preliminaryEvaluationReevaluation.gcsResult" type="text" placeholder="GCS复评">
              <!-- <input type="text" placeholder="GCS复评"> -->
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.end" v-model="preliminaryEvaluationReevaluation.gcsTime" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <el-date-picker type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" /> -->
              <!-- <input type="text" placeholder="复评时间"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2">
              <input :disabled="records.start" v-model="rehabilitationEvaluation.isDrinkingWater" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">饮水试验</label>
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.start" v-model="preliminaryEvaluation.drinkingWaterResult" type="text" placeholder="饮水试验初评">
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.start" v-model="preliminaryEvaluation.drinkingWaterTime" type="datetime" placeholder="初评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input v-model="preliminaryEvaluation.drinkingWaterTime" type="text" placeholder="初评时间"> -->
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.end" v-model="preliminaryEvaluationReevaluation.drinkingWaterResult" type="text" placeholder="饮水试验复评">
              <!-- <input type="text" placeholder="饮水试验复评"> -->
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.end" v-model="preliminaryEvaluationReevaluation.drinkingWaterTime" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <el-date-picker type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" /> -->
              <!-- <input type="text" placeholder="复评时间"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationEvaluation.isRom" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">主要受损关节ROM评定</label>
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.start" v-model="preliminaryEvaluation.romResult" type="text" placeholder="ROM初评">
            </td>
            <td class="table-cell">
              <el-date-picker v-model="preliminaryEvaluation.romTime" :disabled="records.start" type="datetime" placeholder="初评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input v-model="preliminaryEvaluation.romTime" type="text" placeholder="初评时间"> -->
            </td>
            <td class="table-cell" colspan="2">
              <input :disabled="records.end" v-model="preliminaryEvaluationReevaluation.romResult" type="text" placeholder="ROM复评">
              <!-- <input type="text" placeholder="ROM复评"> -->
            </td>
            <td class="table-cell">
              <el-date-picker v-model="preliminaryEvaluationReevaluation.romTime" :disabled="records.end" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <el-date-picker type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" /> -->
              <!-- <input type="text" placeholder="复评时间"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2" rowspan="2">功能障碍点（勾选）
            </td>
            <td class="table-cell" colspan="3">
              <input type="checkbox" :disabled="records.start" v-model="dysfunctionPoint.limbs" name="checkedCheckbox">
              <label for="checkedCheckbox">肢体运动功能障碍</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="dysfunctionPoint.ingurgitation" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">吞咽功能障碍</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="dysfunctionPoint.language" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">言语障碍</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="3"><input :disabled="records.start" v-model="dysfunctionPoint.cognize" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">认知功能障碍</label>
            </td>
            <td class="table-cell" colspan="4"><input :disabled="records.start" v-model="dysfunctionPoint.bladder" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">膀胱、直肠功能障碍</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" rowspan="7">
              <!-- <input :disabled="records.start" type="checkbox" name="checkedCheckbox"> -->
              <label for="checkedCheckbox">初评康复计划及措施（勾选）</label>
            </td>
            <td class="table-cell" colspan="4">
              <input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.muscleForce" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行主动肢体肌力训练</label>
            </td>
            <td class="table-cell" colspan="4"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.articulation" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行主动关节活动度训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="4"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.breath" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行主动呼吸肌训练</label>
            </td>
            <td class="table-cell" colspan="4"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.job" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行作业训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="4" rowspan="2"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.chaperone" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导家属及陪护参与患者被动关节活动度训练</label>
            </td>
            <td class="table-cell" colspan="4"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.escortPatient" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导家属及陪护参与患者床上起坐训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="4"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.urethra" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行尿道括约肌和会阴部训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="4"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.feet" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导家属及陪护参与患者床边站立行走训练</label>
            </td>
            <td class="table-cell" colspan="4"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.bedside" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导家属及陪护参与患者言语、吞咽、认知功能训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.movement" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">运动疗法</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.occupationalTherapy" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">作业疗法</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.ingurgitation" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">吞咽训练</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.language" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">言语训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.rehabilitationEducation" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">康复宣教</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.acupuncture" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">针灸</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.physiotherapy" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">理疗</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.start" v-model="rehabilitationPlanAndMeasuresInfo.hyperbaric" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">高压氧</label>
            </td>
          </tr>
          <!-- 90 -->
          <tr>
            <td class="table-cell" rowspan="7">
              <!-- <input :disabled="records.start" type="checkbox" name="checkedCheckbox"> -->
              <label for="checkedCheckbox">复评康复计划及措施（勾选）</label>
            </td>
            <td class="table-cell" colspan="4">
              <input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.muscleForce" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行主动肢体肌力训练</label>
            </td>
            <td class="table-cell" colspan="4"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.articulation" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行主动关节活动度训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="4"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.breath" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行主动呼吸肌训练</label>
            </td>
            <td class="table-cell" colspan="4"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.job" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行作业训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="4" rowspan="2"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.chaperone" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导家属及陪护参与患者被动关节活动度训练</label>
            </td>
            <td class="table-cell" colspan="4"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.escortPatient" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导家属及陪护参与患者床上起坐训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="4"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.urethra" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导患者进行尿道括约肌和会阴部训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="4"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.feet" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导家属及陪护参与患者床边站立行走训练</label>
            </td>
            <td class="table-cell" colspan="4"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.bedside" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">指导家属及陪护参与患者言语、吞咽、认知功能训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.movement" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">运动疗法</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.occupationalTherapy" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">作业疗法</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.ingurgitation" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">吞咽训练</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.language" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">言语训练</label>
            </td>
          </tr>
          <tr>
            <td class="table-cell" colspan="2"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.rehabilitationEducation" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">康复宣教</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.acupuncture" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">针灸</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.physiotherapy" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">理疗</label>
            </td>
            <td class="table-cell" colspan="2"><input :disabled="records.end" v-model="rehabilitationPlanAndMeasuresInfoReevaluation.hyperbaric" type="checkbox" name="checkedCheckbox">
              <label for="checkedCheckbox">高压氧</label>
            </td>
          </tr>
          <!-- 90 -->
          <!-- 00 -->
          <!-- 00 -->
          <tr>
            <td class="table-cell" rowspan="4">签名
            </td>
            <td class="table-cell" colspan="4">初评康复介入
            </td>
            <td class="table-cell" colspan="4">复评康复介入
            </td>
          </tr>
          <tr>
            <td class="table-cell">患者或家属或陪护
            </td>
            <td class="table-cell">
              <input :disabled="records.start" v-model="signature.patientOrFamilyOrCaregiverSignature" type="text" placeholder="签名">
            </td>
            <td class="table-cell">时间
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.start" v-model="signature.patientOrFamilyOrCaregiverSignatureTime" type="datetime" placeholder="时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input v-model="signature.patientOrFamilyOrCaregiverSignatureTime" type="text" placeholder="时间"> -->
            </td>
            <td class="table-cell">患者或家属或陪护
            </td>
            <td class="table-cell">
              <input :disabled="records.end" v-model="signatureReevaluation.patientOrFamilyOrCaregiverSignature" type="text" placeholder="签名">
              <!-- <input type="text" placeholder="签名"> -->
            </td>
            <td class="table-cell">时间
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.end" v-model="signatureReevaluation.patientOrFamilyOrCaregiverSignatureTime" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <el-date-picker type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" /> -->
              <!-- <input type="text" placeholder="时间"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell">康复医师
            </td>
            <td class="table-cell">
              <input :disabled="records.start" v-model="signature.rehabilitationDoctorSignature" type="text" placeholder="签名">
            </td>
            <td class="table-cell">时间
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.start" v-model="signature.rehabilitationDoctorSignatureTime" type="datetime" placeholder="时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input v-model="signature.rehabilitationDoctorSignatureTime" type="text" placeholder="时间"> -->
            </td>
            <td class="table-cell">康复医师
            </td>
            <td class="table-cell">
              <input :disabled="records.end" v-model="signatureReevaluation.rehabilitationDoctorSignature" type="text" placeholder="签名">
              <!-- <input type="text" placeholder="签名"> -->
            </td>
            <td class="table-cell">时间
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.end" v-model="signatureReevaluation.rehabilitationDoctorSignatureTime" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <el-date-picker type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" /> -->
              <!-- <input type="text" placeholder="时间"> -->
            </td>
          </tr>
          <tr>
            <td class="table-cell">康复师
            </td>
            <td class="table-cell">
              <input :disabled="records.start" v-model="signature.therapistsSignature" type="text" placeholder="签名">
            </td>
            <td class="table-cell">时间
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.start" v-model="signature.therapistsSignatureTime" type="datetime" placeholder="时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <input v-model="signature.therapistsSignatureTime" type="text" placeholder="时间"> -->
            </td>
            <td class="table-cell">康复师
            </td>
            <td class="table-cell">
              <input :disabled="records.end" v-model="signatureReevaluation.therapistsSignature" type="text" placeholder="签名">
              <!-- <input type="text" placeholder="签名"> -->
            </td>
            <td class="table-cell">时间
            </td>
            <td class="table-cell">
              <el-date-picker :disabled="records.end" v-model="signatureReevaluation.therapistsSignatureTime" type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" />
              <!-- <el-date-picker type="datetime" placeholder="复评时间" value-format="yyyy-MM-ddTHH:mm:ss" /> -->
              <!-- <input type="text" placeholder="时间"> -->
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <div class="static-content-item-head center ">
      <div class="static-content-item p-20">
        <div style="width: 120px;">记录人员：</div>
        <input type="text" :disabled="records.start" v-model="operator" name="" id="" placeholder="请输入" style="text-align: left;">
      </div>
      <div class="static-content-item p-20">
        <div style="width: 120px;">医生签章：</div>
        <input type="text" :disabled="records.start" v-model="doctorStamp" name="" id="" placeholder="请输入" style="text-align: left;">
      </div>
      <div class="static-content-item p-20">
        <div style="width: 65px;">日期：</div>
        <el-date-picker :disabled="records.start" v-model="stampTime" type="datetime" placeholder="时间" value-format="yyyy-MM-ddTHH:mm:ss" />
        <!-- <input type="text" v-model="stampTime" name="" id="" placeholder="请输入" style="text-align: left;"> -->
      </div>
    </div>
  </el-form>

</template>

<script>
import moment from 'moment';
export default {
  components: {},
  props: {
    user: { type: Object, default: () => ({}) }, // 用户信息
    data: { type: Object, default: () => ({}) }, // 表单信息
    isNew: { type: Number, default: 1 }, // 1新增
    estimateType: { type: Number, default: 1 }, // 评定类型 1=初评 2=复评
  },
  data() {
    return {
      formData: {},
      rules: {},
      mainDiagnosis: null, // 主要诊断
      rehabilitationEvaluation: {
        isBrunnstrom: false, //偏瘫运动功能评定
        isAsia: false, // asia残损分级
        isMbiAdl: false, // mbiadl能力
        isMmse: false, // mmse评定
        isGcs: false, // gcs昏迷评定
        isDrinkingWater: false, //饮水试验
        isRom: false, // 主要受损关节rom评定
      }, // 康复-评定项目
      preliminaryEvaluation: {
        brunnstromUpperLimbResult: null, // 上肢
        brunnstromLowerLimbResult: null, // 下肢
        brunnstromHandResult: null, // 手
        brunnstromTime: null, // 评定时间
        asiaResult: null, // asia初评
        asiaTime: null, // asia初评时间
        mbiAdlResult: null, // mbiadl结果
        mbiAdlTime: null, // mbiadl初评时间
        mmseResult: null, // mmse结果
        mmseTime: null, // mmse初评时间
        gcsResult: null, // gcs结果
        gcsTime: null, // gcs初评时间
        drinkingWaterResult: null, // 饮水初评
        drinkingWaterTime: null, // 饮水初评时间
        romResult: null, // 主要受损关节rom评定
        romTime: null, // 主要受损关节rom初评时间
      }, // 康复-初评
      preliminaryEvaluationReevaluation: {
        brunnstromUpperLimbResult: null, // 上肢
        brunnstromLowerLimbResult: null, // 下肢
        brunnstromHandResult: null, // 手
        brunnstromTime: null, // 评定时间
        asiaResult: null, // asia复评
        asiaTime: null, // asia复评时间
        mbiAdlResult: null, // mbiadl结果
        mbiAdlTime: null, // mbiadl复评时间
        mmseResult: null, // mmse结果
        mmseTime: null, // mmse复评时间
        gcsResult: null, // gcs结果
        gcsTime: null, // gcs复评时间
        drinkingWaterResult: null, // 饮水复评
        drinkingWaterTime: null, // 饮水复评时间
        romResult: null, // 主要受损关节rom评定
        romTime: null, // 主要受损关节rom复评时间
      }, // 康复-复评
      dysfunctionPoint: {
        limbs: false, // 肢体运动功能障碍
        ingurgitation: false, // 吞咽功能障碍
        language: false, // 言语障碍
        cognize: false, // 认知功能障碍
        bladder: false, // 膀胱、直肠功能障碍
      }, // 功能障碍点 1 肢体运动 2 吞咽 3言语 4 认知 5 膀胱
      rehabilitationPlanAndMeasuresInfo: {
        muscleForce: false, // 指导患者进行主动肢体肌力训练
        articulation: false, // 指导患者进行主动关节活动度训练
        breath: false, // 指导患者进行主动呼吸肌训练
        job: false, // 指导患者进行作业训练
        chaperone: false, // 指导家属及陪护参与患者被动关节活动度训练
        escortPatient: false, // 指导家属及陪护参与患者床上起坐训练
        urethra: false, // 指导患者进行尿道括约肌和会阴部训练
        feet: false, // 指导家属及陪护参与患者床边站立行走训练
        bedside: false, // 指导家属及陪护参与患者言语、吞咽、认知功能训练
        movement: false, // 运动疗法
        occupationalTherapy: false, // 作业疗法
        ingurgitation: false, // 吞咽训练
        language: false, // 言语训练
        rehabilitationEducation: false, // 康复宣教
        acupuncture: false, // 针灸
        physiotherapy: false, // 理疗
        hyperbaric: false, // 高压氧
      }, // 康复计划及措施-初评
      rehabilitationPlanAndMeasuresInfoReevaluation: {
        muscleForce: false, // 指导患者进行主动肢体肌力训练
        articulation: false, // 指导患者进行主动关节活动度训练
        breath: false, // 指导患者进行主动呼吸肌训练
        job: false, // 指导患者进行作业训练
        chaperone: false, // 指导家属及陪护参与患者被动关节活动度训练
        escortPatient: false, // 指导家属及陪护参与患者床上起坐训练
        urethra: false, // 指导患者进行尿道括约肌和会阴部训练
        feet: false, // 指导家属及陪护参与患者床边站立行走训练
        bedside: false, // 指导家属及陪护参与患者言语、吞咽、认知功能训练
        movement: false, // 运动疗法
        occupationalTherapy: false, // 作业疗法
        ingurgitation: false, // 吞咽训练
        language: false, // 言语训练
        rehabilitationEducation: false, // 康复宣教
        acupuncture: false, // 针灸
        physiotherapy: false, // 理疗
        hyperbaric: false, // 高压氧
      }, // 康复计划及措施-复评
      signature: {
        patientOrFamilyOrCaregiverSignature: null, // 患者或家属或陪护签名
        patientOrFamilyOrCaregiverSignatureTime: null, // 患者或家属或陪护签名时间
        rehabilitationDoctorSignature: null, // 康复医师签名
        rehabilitationDoctorSignatureTime: null, //康复医师签名
        therapistsSignature: null, // 康复师
        therapistsSignatureTime: null, // 康复师签名
      }, // 签名-初评
      signatureReevaluation: {
        patientOrFamilyOrCaregiverSignature: null, // 患者或家属或陪护签名
        patientOrFamilyOrCaregiverSignatureTime: null, // 患者或家属或陪护签名时间
        rehabilitationDoctorSignature: null, // 康复医师签名
        rehabilitationDoctorSignatureTime: null, //康复医师签名
        therapistsSignature: null, // 康复师
        therapistsSignatureTime: null, // 康复师签名
      }, // 签名-复评
      operator: null, // 记录人员
      doctorStamp: null, // 医生签章
      stampTime: null, // 签章日期
      records: {
        start: true,
        end: true
      }
    }
  },
  computed: {
    // 判断用户当前性别
    getGender() {
      switch (this.user.gender) {
        case 0: return "女";
        case 1: return "男";
        default: return null;
      }
    }
  },
  watch: {},
  created() {
    // 获取路由数据
    this.getRoute();
    // 对数据进行拆解
    this.dismantleData();
  },
  mounted() { },
  methods: {
    getRoute() {
      let { type = 0 } = this.$route.query;
      if (!Number(type)) {
        // 第一次评估
        this.records = { start: false, end: true };
      } else {
        // 第二次评估
        if (this.data.estimates.length > 1) {
          this.records = { start: true, end: true };
        } else {
          this.records = { start: true, end: false };
        };
      };
    },
    getForm() {
      let {
        mainDiagnosis, rehabilitationEvaluation, preliminaryEvaluation,
        dysfunctionPoint,
        rehabilitationPlanAndMeasuresInfo,
        signature,
        operator,
        doctorStamp,
        stampTime,
        isNew,
        estimateType
      } = this;
      let relationId = this.$route.query.adviceId;
      let form = {
        isNew, estimateType, relationId,
        mainDiagnosis, operator, doctorStamp, stampTime,
        dysfunctionPoint: Object.values(dysfunctionPoint),
        rehabilitationPlanAndMeasuresInfo: Object.values(rehabilitationPlanAndMeasuresInfo),
        evaluateSource: 3,
        ...rehabilitationEvaluation,
        ...preliminaryEvaluation,
        ...signature
      };
      return form
    },
    // 获取复评表单
    getFormReevaluation() {
      let {
        mainDiagnosis, rehabilitationPlanAndMeasuresInfoReevaluation, preliminaryEvaluationReevaluation,
        dysfunctionPoint,
        rehabilitationEvaluation,
        signatureReevaluation,
        operator,
        doctorStamp,
        stampTime,
        isNew,
        estimateType
      } = this;
      let relationId = this.$route.query.adviceId;
      let form = {
        isNew, estimateType, relationId,
        mainDiagnosis, operator, doctorStamp, stampTime,
        dysfunctionPoint: Object.values(dysfunctionPoint),
        rehabilitationPlanAndMeasuresInfo: Object.values(rehabilitationPlanAndMeasuresInfoReevaluation),
        evaluateSource: 3,
        ...rehabilitationEvaluation,
        ...preliminaryEvaluationReevaluation,
        ...signatureReevaluation
      };
      return form
    },
    dismantleData() {
      // 回显评定项目
      this.setRehabilitationEvaluation();
      //  回显康复初评 
      this.setPreliminaryEvaluation();
      // 回显康复计划及措施-初评
      this.setRehabilitationPlanAndMeasuresInfo();
      //   回显功能障碍点
      this.setDysfunctionPoint();
      //   回显签名
      this.setSignature();
      //   其它
      this.other();

      let { estimates = [] } = this.data;
      //   复评回显
      if (estimates.length > 1) {
        // 康复-复评
        this.setPreliminaryEvaluationReevaluation();
        this.setRehabilitationPlanAndMeasuresInfoReevaluation();
        this.setSignatureReevaluation();
      }
    },
    // 回显评定项目
    setRehabilitationEvaluation() {
      let { estimates = [] } = this.data;
      if (estimates) {
        let soures = estimates[0]['estimateInfo'];
        let data = this.rehabilitationEvaluation;
        Object.keys(data).forEach(key => {
          data[key] = eval(soures[key]);
        });
      };
    },
    // 回显康复初评
    setPreliminaryEvaluation() {
      let { estimates = [] } = this.data;
      if (estimates) {
        let soures = estimates[0]['estimateInfo'];
        let data = this.preliminaryEvaluation;
        for (const key in data) {
          if (Object.hasOwnProperty.call(data, key)) {
            if (typeof soures[key] === 'number') {
              data[key] = moment(soures[key]).format('YYYY-MM-DD HH:mm:ss');
            } else {
              data[key] = soures[key];
            }
          }
        };
      };
    },
    // 回显康复初评
    setPreliminaryEvaluationReevaluation() {
      let { estimates = [] } = this.data;
      if (estimates) {
        let soures = estimates[0]['estimateInfo'];
        let data = this.preliminaryEvaluationReevaluation;
        for (const key in data) {
          if (Object.hasOwnProperty.call(data, key)) {
            if (typeof soures[key] === 'number') {
              data[key] = moment(soures[key]).format('YYYY-MM-DD HH:mm:ss');
            } else {
              data[key] = soures[key];
            }
          }
        };
      };
    },
    // 回显康复计划及措施-初评
    setRehabilitationPlanAndMeasuresInfo() {
      let { estimates = [] } = this.data;
      if (estimates) {
        let soures = estimates[0]['estimateInfo'];
        let data = this.rehabilitationPlanAndMeasuresInfo;
        Object.keys(data).forEach((key, index) => {
          data[key] = eval(soures['rehabilitationPlanAndMeasuresInfo'][index]);
        });
      };
    },
    setRehabilitationPlanAndMeasuresInfoReevaluation() {
      let { estimates = [] } = this.data;
      if (estimates) {
        let soures = estimates[0]['estimateInfo'];
        let data = this.rehabilitationPlanAndMeasuresInfoReevaluation;
        Object.keys(data).forEach((key, index) => {
          data[key] = eval(soures['rehabilitationPlanAndMeasuresInfo'][index]);
        });
      };
    },
    // 回显签名-初评
    setSignature() {
      let { estimates = [] } = this.data;
      if (estimates) {
        let soures = estimates[0]['estimateInfo'];
        let data = this.signature;
        for (const key in data) {
          if (Object.hasOwnProperty.call(data, key)) {
            if (typeof soures[key] === 'number') {
              data[key] = moment(soures[key]).format('YYYY-MM-DD HH:mm:ss');
            } else {
              data[key] = soures[key];
            }
          }
        };
      };
    },
    // 回显签名-复评
    setSignatureReevaluation() {
      let { estimates = [] } = this.data;
      if (estimates) {
        let soures = estimates[0]['estimateInfo'];
        let data = this.signatureReevaluation;
        for (const key in data) {
          if (Object.hasOwnProperty.call(data, key)) {
            if (typeof soures[key] === 'number') {
              data[key] = moment(soures[key]).format('YYYY-MM-DD HH:mm:ss');
            } else {
              data[key] = soures[key];
            }
          }
        };
      };
    },
    // 回显功能障碍点
    setDysfunctionPoint() {
      let data = this.dysfunctionPoint;
      Object.keys(data).forEach((key, index) => {
        data[key] = eval(this.data['dysfunctionInfo'][index]);
      });
    },
    // 其它
    other() {
      let { mainDiagnosis = null, operator = null, doctorStamp = null, stampTime = null } = this.data;
      mainDiagnosis && (this.mainDiagnosis = mainDiagnosis);
      operator && (this.operator = operator);
      doctorStamp && (this.doctorStamp = doctorStamp);
      stampTime && (this.stampTime = moment(stampTime).format('YYYY-MM-DD HH:mm:ss'));
    },
    submitForm() {
      this.$refs['vForm'].validate(valid => {
        if (!valid) return
        //TODO: 提交表单
      })
    },
    resetForm() {
      this.$refs['vForm'].resetFields()
    }
  }
}

</script>

<style lang="scss" scoped>
.center {
  width: 80%;
  margin: 0 auto;
}

.record-title {
  font-size: 27px;
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
}

label {
  font-weight: 500;
}

input::placeholder {
  color: #ccc; /* 设置 placeholder 颜色为灰色 */
}

.el-input-number.full-width-input,
.el-cascader.full-width-input {
  width: 100% !important;
}

.clear-fix:before,
.clear-fix:after {
  display: table;
  content: "";
}

.clear-fix:after {
  clear: both;
}

.float-right {
  float: right;
}
</style>

<style lang="scss" scoped>
div.table-container {
  table.table-layout {
    table-layout: fixed;
    border-collapse: collapse;
    text-align: center;
    width: 100%;

    td.table-cell {
      display: table-cell;
      height: 38px;
      border: 1px solid #333;
      font-size: 16px;
      overflow-wrap: break-word;

      /deep/ .el-date-editor {
        width: 100% !important;
        .el-input {
          width: 100% !important;
        }
      }
    }
  }
}

.custom-label {
}

.static-content-item {
  min-height: 20px;
  display: flex;
  align-items: center;
  margin-right: 20px;

  ::v-deep .el-divider--horizontal {
    margin: 0;
  }
}

.static-content-item-head {
  min-height: 20px;
  font-size: 16px;
  display: flex;

  ::v-deep .el-divider--horizontal {
    margin: 0;
  }
}

::v-deep .el-divider--horizontal {
  margin: 0;
}

.footer {
  font-size: 16px;
}

//宽度
.w-50 {
  width: 50px;
}

.w-100 {
  width: 100px;
}

.w-150 {
  width: 150px;
}

.w-200 {
  width: 200px;
}

.p-20 {
  padding: 20px 0;
}

// 去除input样式
input {
  border: none;
  text-align: center;
  width: 100%;
}

input[type="text"]:focus {
  outline: none;
}
</style>